package com.itheima.tlias84.po;

import com.itheima.tlias84.dto.SelectExprDTO;
import com.itheima.tlias84.entity.Experience;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class UpdateEmpParam {

    private int id;
    @NotNull(message = "用户名不能为空")
    @Length(min = 2,max = 20 ,message = "用户名长度为[2,20]")
    private String username;
    @NotNull(message = "姓名不能为空")
    @Length(min = 2,max = 10 ,message = "姓名长度为[2,20]")
    private String name;
    @NotNull(message = "手机号不能为空")
    @Length(min = 11,message = "手机号长度必须为11位")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号格式错误")
    private String phone;
    private int gender;
    private Integer job;
    private String image;
    private LocalDate entryDate;
    private Integer deptId;
    private Integer salary;
    private LocalDateTime updateTime;
    //工作经历
    private List<Experience> exprList;
}
